#include "MUA_utils.h"

void pList_print(List *list)
{
	//printf("List:");
	LIST_FOREACH(list, first, next, cur) {
		printf("node value: %s\r\n", (cur->value!=NULL ? cur->value : "NULL"));
	}
	printf("\n");
}

void testList()
{
	char *strings[] = {"test1", "test2", "test3"};
	List *l = List_create();
	
	printf("\n%d\n",List_count(l));
	pList_print(l);
	List_push(l,strings[0]);
	printf("\n%d\n",List_count(l));
	pList_print(l);
	List_push(l,strings[1]);
	printf("\n%d\n",List_count(l));
	pList_print(l);
	List_push(l,strings[2]);
	printf("\n%d\n",List_count(l));
	pList_print(l);	
	List_clear(l);
	printf("\n%d\n",List_count(l));	
	pList_print(l);
	List_destroy(l);
}